//test::https://leetcode.cn/problems/power-of-two/
class Solution {
public:
    bool isPowerOfTwo(int n) {
       //只需看最右侧是不是1
       return n>0&&(n&(n-1))==0;
    }
};